#include <iostream>

void PrintLine(unsigned* line, unsigned size)
{
	for (unsigned i = 0; i != size; ++i)
	{
		std::cout << line[i] << (i + 1 != size ? ' ' : '\n');
	}
}

void PrintYangHuiTriangle(unsigned n)
{
	if (!n)
		return;
	
	unsigned* line = new unsigned[n];

	line[0] = 1u;
	for (unsigned line_num = 0; line_num != n; ++line_num)
	{
		for (unsigned i = 1, prev = line[0], temp; i < line_num; ++i)
		{
			temp = line[i];
			line[i] += prev;
			prev = temp;
		}
		line[line_num] = 1u;

		PrintLine(line, line_num + 1u);
	}

	delete [] line;
}

int main()
{
	unsigned n;

	std::cin >> n;

	PrintYangHuiTriangle(n);

	return 0;
}